package types

// ReviewRecordReq 制片管理列表请求参数
type ProductionManageReq struct {
	ProjectIdList []uint64 `json:"project_id_list" binding:"required"`
	Episode       []string `json:"episode"`
	Page          []int    `json:"page" binding:"required"`
	StartTime     uint64   `json:"start_time"`
	EndTime       uint64   `json:"end_time"`
}

// ProductionManageInfoReq 制片管理详情请求参数
type ProductionManageInfoReq struct {
	ProjectIdList      []uint64 `json:"project_id_list" binding:"required"`
	StepCategoryIdList []int    `json:"step_category_id_list" binding:"required"`
	Page               []int    `json:"page" binding:"required"`
	StartTime          uint64   `json:"start_time"`
	EndTime            uint64   `json:"end_time"`
}

// EpisodeData
type EpisodeData struct {
	EntityCode string `json:"entity_code"`
	EpisodeId  uint64 `json:"episode_id"`
}

// EntityEpisodeRelationStepData
type EntityEpisodeRelationStepData struct {
	PlanEndTime    uint64 `json:"plan_end_time"`
	PlanStartTime  uint64 `json:"plan_start_time"`
	TaskStatusId   uint64 `json:"task_status_id"`
	EntityId       uint64 `json:"entity_id"`
	StepId         uint64 `json:"step_id"`
	StepCategoryId int    `json:"step_category_id"`
	EpisodeId      uint64 `json:"episode_id"`
}

type MakingList struct {
	EpisodeId      uint64 `json:"episode_id"`
	StepCategoryId int    `json:"step_category_id"`
	MakingNum      uint64 `json:"making_num"`
}

type CartListItem struct {
	DesignStepCategoryId    int
	ModelStepCategoryId     int
	RigStepCategoryId       int
	SequenceStepCategoryId  int
	EngineSetStepCategoryId int
	SolutionStepCategoryId  int
	DesignTotal             uint64
	DesignMakeIngNum        uint64
	ModelTotal              uint64
	ModelMakeNum            uint64
	RigTotal                uint64
	RigMakeNum              uint64
	SequenceTotal           uint64
	SequenceMakeNum         uint64
	EngineSetTotal          uint64
	EngineSetMakeNum        uint64
	SolutionTotal           uint64
	SolutionMakeNum         uint64
	StepCategoryId          int
}

type OverDueNumRes struct {
	EpisodeId      uint64 `json:"episode_id"`
	OverdueNum     uint64 `json:"overdue_num"`
	StepCategoryId int    `json:"step_category_id"`
}

type StepTaskInfoRes struct {
	StepCategoryId int    `json:"step_category_id"`
	EpisodeId      uint64 `json:"episode_id"`
	StepId         int    `json:"step_id"`
	Num            uint64 `json:"num"`
	StepCode       string `json:"step_code"`
	StepName       string `json:"step_name"`
	IsStandard     string `json:"is_standard"`
	IsEnableCensus string `json:"is_enable_census"`
	ShowName       string `json:"show_name"`
	ShowIndex      uint64 `json:"show_index"`
}

type StepColumn struct {
	Id             int    `json:"id"`
	Name           string `json:"name"`
	Code           string `json:"code"`
	StepCategoryId int    `json:"step_category_id"`
}

type UnderRepair struct {
	MaxNumber      uint64 `json:"max_number"`
	StepCategoryId int    `json:"step_category_id"`
	EpisodeId      uint64 `json:"episode_id"`
}

type EpisodeTask struct {
	StepCategoryId int    `json:"step_category_id"`
	EpisodeId      uint64 `json:"episode_id"`
	Num            uint64 `json:"num"`
}

type StepEpisodeTask struct {
	Num       uint64 `json:"num"`
	StepId    uint64 `json:"step_id"`
	EpisodeId uint64 `json:"episode_id"`
}

type StepMakingList struct {
	EpisodeId uint64 `json:"episode_id"`
	StepId    int    `json:"step_id"`
	MakingNum uint64 `json:"making_num"`
}

type OverDueStepNumRes struct {
	EpisodeId  uint64 `json:"episode_id"`
	OverdueNum uint64 `json:"overdue_num"`
	StepId     int    `json:"step_id"`
}

type StepUnderRepair struct {
	MaxNumber uint64 `json:"max_number"`
	StepId    int    `json:"step_id"`
	EpisodeId uint64 `json:"episode_id"`
	Num       uint64 `json:"num"`
}

type StepCategoryFinishTask struct {
	Num            uint64 `json:"num"`
	StepCategoryId int    `json:"step_category_id"`
	EpisodeId      uint64 `json:"episode_id"`
}

type RepairStepCategory struct {
	Num            uint64 `json:"num"`
	StepCategoryId int    `json:"step_category_id"`
	MaxNumber      uint64 `json:"max_number"`
	EpisodeId      uint64 `json:"episode_id"`
}

type RepairIngStepCategory struct {
	Num            uint64 `json:"num"`
	StepCategoryId int    `json:"step_category_id"`
	MaxNumber      uint64 `json:"max_number"`
	EpisodeId      uint64 `json:"episode_id"`
}

type EpisodeJson struct {
	EpisodeId           uint64 `json:"episode_id"`
	Id                  uint64 `json:"id"`
	EpisodePlanSealTime string `json:"episode_plan_seal_time"`
	EpisodeSealTime     int64  `json:"episode_seal_time"`
	EpisodePlanShowTime string `json:"episode_plan_show_time"`
	EpisodeIsSeal       string `json:"episode_is_seal"`
}

type StepFinishTask struct {
	Num       uint64 `json:"num"`
	StepId    int    `json:"step_id"`
	EpisodeId uint64 `json:"episode_id"`
}

type StepCategoryRepairIng struct {
	EpisodeId      uint64 `json:"episode_id"`
	RepairIngNum   uint64 `json:"repair_ing_num"`
	StepCategoryId int    `json:"step_category_id"`
}

type StepCategoryRepairNum struct {
	EpisodeId      uint64 `json:"episode_id"`
	RepairNum      uint64 `json:"repair_num"`
	StepCategoryId int    `json:"step_category_id"`
}

type StepRepairIng struct {
	EpisodeId    uint64 `json:"episode_id"`
	RepairIngNum uint64 `json:"repair_ing_num"`
	StepId       int    `json:"step_id"`
}

type StepRepair struct {
	EpisodeId uint64 `json:"episode_id"`
	RepairNum uint64 `json:"repair_num"`
	StepId    int    `json:"step_id"`
}

type StatisticalStepCategoryConfig struct {
	Code int64  `json:"code"`
	Msg  string `json:"msg"`
	Data []struct {
		Id             int    `json:"id"`
		Name           string `json:"name"`
		Code           string `json:"code"`
		IsStandard     string `json:"is_standard"`
		IsEnableCensus string `json:"is_enable_census"`
		IsShow         string `json:"is_show"`
		ShowName       string `json:"show_name"`
		ShowIndex      uint64 `json:"show_index"`
	} `json:"data"`
}

type StatisticalStepCategoryConfigReq struct {
	Param struct {
		Filter struct {
			ProjectId uint64 `json:"project_id"`
		} `json:"filter"`
	} `json:"param"`
}

type TodayCountReq struct {
	ProjectId          int64    `json:"project_id"`
	SpecialRoleFilter  string   `json:"special_role_filter"`
	TodoStepCategoryId []int64  `json:"todo_step_category_id"`
	StartTime          int64    `json:"start_time"`
	EndTime            int64    `json:"end_time"`
	TaskStepType       []string `json:"task_step_type"`        // 工序类型
	Executor           int64    `json:"executor"`              // 执行人
	IsMyResponsible    bool     `json:"is_my_responsible"`     // 是否我负责的任务
	DepartmentId       uint64   `json:"department_id"`         // 部门id
	ExecutorUserIdList []int64  `json:"executor_user_id_list"` // 执行人筛选
	DateType           string   `json:"date_type"`             // 时间筛选类型
	OnlyNotDone        bool     `json:"only_not_done"`         // 仅显示未完成
	StandardOrOther    string   `json:"standard_or_other"`     // 标准或其他
}

type TodayCountRes struct {
	Total         uint64 `json:"total"` // 任务总数
	Done          uint64 `json:"done"`  // 已完成的
	Inprogress    uint64 `json:"inprogress"`
	Abnormal      uint64 `json:"abnormal"`
	DelayFinalNum uint64 `json:"delay_final_num"` // 延期完成的
	NotFinalNum   uint64 `json:"not_final_num"`   // 未完成的
	NotStartNum   uint64 `json:"not_start_num"`   // 未开始的
	AbnormalNum   uint64 `json:"abnormal_num"`    // 异常的
	RepairNum     uint64 `json:"repair_num"`      // 返修
}

type ProgressCountReq struct {
	ProjectId int64 `json:"project_id" binding:"required"`
}

type CurrentMonthShouldDoneItem struct {
	EpisodeId   int64  `json:"episode_id"`   // 剧集id
	EpisodeName string `json:"episode_name"` // 剧集名称
	Progress    int64  `json:"progress"`     // 进度
	Total       int64  `json:"total"`        // 任务总数
	Done        int64  `json:"done"`         // 完成总数
	Abnormal    bool   `json:"abnormal"`     // 是否异常
}

type ProgressCountResItem struct {
	CategoryIdList         []int64                      `json:"category_id_list"`          // 分类idList
	ModuleCodeList         []string                     `json:"module_code_list"`          // 分类模块List
	CategoryName           string                       `json:"category_name"`             // 分类名称
	TotalProgressTotal     int64                        `json:"total_progress_total"`      // 总进度总数
	TotalProgressAbnormal  bool                         `json:"total_progress_abnormal"`   // 总进度异常
	TotalProgressDone      int64                        `json:"total_progress_done"`       // 总进度完成数量
	TodayProgressAbnormal  bool                         `json:"today_progress_abnormal"`   // 今日进度异常
	TodayProgressTotal     int64                        `json:"today_progress_total"`      // 今日进度总数
	TodayProgressDone      int64                        `json:"today_progress_done"`       // 今日进度完成数量
	CurrentMonthShouldDone []CurrentMonthShouldDoneItem `json:"current_month_should_done"` // 本月应交付 剧集进度
	Type                   string                       `json:"type"`                      // 类型: 角色(role),环节(step_category)
}

type StepCategoryProgressCount struct {
	StepCategoryId int   `json:"step_category_id"` // 分类id
	TotalTask      int64 `json:"total_task"`       // 总任务数量
	DoneTask       int64 `json:"done_task"`        // 完成任务数量
	TodayTotalTask int64 `json:"today_total_task"` // 今日总数
	TodayDoneTask  int64 `json:"today_done_task"`  // 今日完成总数
}

type EpisodeStepCategoryProgressCount struct {
	EpisodeId        int64  `json:"episode_id"`         // 剧集idt
	EpisodeCode      string `json:"episode_code"`       // 剧集code
	StepCategoryId   int64  `json:"step_category_id"`   // 分类id
	StepCategoryName int64  `json:"step_category_name"` // 分类名称
	TotalCount       int64  `json:"total_count"`        // 任务总数
	DoneCount        int64  `json:"done_count"`         // 完成总数
}

type GetEpisodeStepCategoryTaskProgressCountReq struct {
	ProjectId       int64   `json:"project_id" binding:"required"`
	StepCategoryIds []int64 `json:"step_category_ids" binding:"required"`
	EpisodeId       int64   `json:"episode_id" binding:"required"`
}

// GetMonthPlanTodoTaskProgressReq
type GetMonthPlanTodoTaskProgressReq struct {
	ProjectId int64 `json:"project_id" binding:"required"`
	EpisodeId int64 `json:"episode_id" binding:"required"`
}

type GetMonthPlanTodoTaskProgressRes struct {
	Name            string    `json:"name"`
	Count           int64     `json:"count"`
	CompleteCount   int64     `json:"complete_count"`
	EndTime         int64     `json:"end_time"`
	StepCategoryIds []int64   `json:"step_category_ids"`
	Progress        int64     `json:"progress"`
	IsAbnormal      bool      `json:"is_abnormal"`
	MeetingList     []Meeting `json:"meeting_list"`
	IsSeal          bool      `json:"is_seal"`
}

type Meeting struct {
	Id             int64  `json:"id"`
	TaskId         int64  `json:"task_id"`
	StepCategoryId int64  `json:"step_category_id"`
	Name           string `json:"name"`
}

type EpisodeTaskCountRes struct {
	ModuleName    string `json:"module_name"`
	Name          string `json:"name"`
	Count         int64  `json:"count"`
	FinishCount   int64  `json:"finish_count"`
	AbnormalCount int64  `json:"abnormal_count"`
}

type EpisodeTaskCountReq struct {
	ProjectId       int64   `json:"project_id" binding:"required"`
	StepCategoryIds []int64 `json:"step_category_ids" binding:"required"`
	EpisodeId       int64   `json:"episode_id" binding:"required"`
}

type ReviewFeedbackCountReq struct {
	ReviewFeedbackId int64  `json:"review_feedback_id" binding:"required"`
	ProjectId        int64  `json:"project_id" binding:"required"`
	EpisodeCode      string `json:"episode_code" binding:"required"`
}

type ReviewFeedbackCountRes struct {
	Name        string `json:"name"`
	Color       string `json:"color"`
	Count       int64  `json:"count"`
	RepairCount int64  `json:"repair_count"`
	Progress    int64  `json:"progress"`
}

// DirectorStarReq 导演关注请求参数
type DirectorStarReq struct {
	ProjectId  int64  `json:"project_id" binding:"required"`
	ModuleCode string `json:"module_code"`
	StartType  string `json:"start_type"` // 关注类型
	Page       []int  `json:"page" binding:"required"`
}

// DirectorStarCountList 导演关注返回参数
type DirectorStarCountList struct {
	Name string `json:"name"` // 名字
	Num  int64  `json:"num"`  // 数量
}

// DirectorStarList 返回列表
type DirectorStarList struct {
	Id                 int64  `json:"id"`
	Category           string `json:"category"`           // 类型
	Grade              string `json:"grade"`              // 等级
	InitialEpisodeCode string `json:"initialEpisodeCode"` // 剧集id
	ShowingsNumber     string `json:"showingsNumber"`     // 场次
	EntityName         string `json:"entityName"`         // 实体名字
	ShotClothSolution  string `json:"shotClothSolution"`  // 解算方式
	ShotFx             string `json:"shotFx"`             // 特效
}

// DirectorStarRes 导演关注返回参数
type DirectorStarRes struct {
	CountList []DirectorStarCountList `json:"countList"` // 统计列表
	List      []DirectorStarList      `json:"list"`      // 列表
}

type EpisodeTaskStepCategoryProgressData struct {
	EpisodeId      int64 `json:"episode_id"`
	StepCategoryId int64 `json:"step_category_id"`
	Count          int64 `json:"count"`
	CompleteCount  int64 `json:"complete_count"`
	AbnormalCount  int64 `json:"abnormal_count"`
	EntityCount    int64 `json:"entity_count"`
}

type TotalTaskCountReq struct {
	Param struct {
		Filter TotalTaskCountReqFilter `json:"filter" binding:"required"`
	} `json:"param" binding:"required"`
}

type TotalTaskCountReqFilter struct {
	CategoryIdList []int64 `json:"category_id_list" binding:"required"`
	ProjectId      int64   `json:"project_id"`
	StartTime      int64   `json:"start_time"`
	EndTime        int64   `json:"end_time"`
	IsNowMonth     int64   `json:"is_now_month"`
	Type           string  `json:"type"`
}

type TotalYearMonthEpisodeTaskProgressReq struct {
	StepCategoryIds []int64 `json:"step_category_id"`
	EpisodeIds      []int64 `json:"episode_id"`
	ProjectId       int64   `json:"project_id"`
}

type TotalYearMonthEpisodeTaskProgressRes struct {
	EpisodeId      int64 `json:"episode_id"`
	StepCategoryId int64 `json:"step_category_id"`
	Count          int64 `json:"count"`
	CompleteCount  int64 `json:"complete_count"`
}

type TotalDirectorYearMonthEpisodeTaskProgressRes struct {
	YearMonth     int64 `json:"year_month"`
	Year          int64 `json:"year"`
	Month         int64 `json:"month"`
	EpisodeId     int64 `json:"episode_id"`
	Count         int64 `json:"count"`
	CompleteCount int64 `json:"complete_count"`
}

type TotalYearMonthTaskNumCountRes struct {
	YearMonth int64 `json:"year_month"`
	Year      int64 `json:"year"`
	Month     int64 `json:"month"`
	Count     int64 `json:"count"`
}

type TotalTaskCountRes struct {
	Year  int64                    `json:"year"`
	Month []TotalTaskCountMonthRes `json:"month"`
}

type TotalTaskCountMonthRes struct {
	IsNowMonth      string                          `json:"is_now_month"`
	MonthName       int64                           `json:"month_name"`
	TaskNum         int64                           `json:"task_num"`
	EpisodeNameList []TotalTaskCountMonthEpisodeRes `json:"episode_name_list"`
}

type TotalTaskCountMonthEpisodeRes struct {
	EpisodeId    int64  `json:"episode_id"`
	EpisodeName  string `json:"episode_name"`
	FinalTaskNum int64  `json:"final_task_num"`
	Progress     int64  `json:"progress"`
	TotalTaskNum int64  `json:"total_task_num"`
}

type TotalTaskEntityCountReq struct {
	EpisodeId      []int64 `json:"episode_id"`
	ProjectId      int64   `json:"project_id" binding:"required"`
	StepCategoryId []int64 `json:"step_category_id" binding:"required"`
	StartTime      int64   `json:"start_time" binding:"required"`
	EndTime        int64   `json:"end_time" binding:"required"`
}

type GetMonthListRes struct {
	Year  int64
	Month []int64
}
